local PANEL = {}

function PANEL:Init()
	self:SetSize(64, 64)
	self:SetText("")
	
	self.Prop = {Name="Untitled", Model="", Price=0}
end

function PANEL:SetProp(prop)
	self.Prop = prop
end

function PANEL:Paint()
	surface.SetDrawColor(40, 40, 40, 255)
	surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
	
	surface.SetDrawColor(0, 0, 0, 140)
	surface.DrawRect(0, self:GetTall()-16, self:GetWide(), 16)
	
	if self.Hovered then
		surface.SetDrawColor(0, 255, 0, 10) -- change if can afford.
		surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
	end
	
	draw.SimpleText(self.Prop["Name"], "Flood12", self:GetWide()/2, self:GetTall()-8, colour_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
	
	surface.SetDrawColor(0, 0, 0, 255)
	surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
end

vgui.Register("PropIcon", PANEL, "DButton")